package com.example.springboottestgit.task;

import com.example.springboottestgit.service.InstanceVideoService;
import com.example.springboottestgit.service.InviteTenderService;
import com.example.springboottestgit.service.SubmitTenderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @author: ZZZ
 */
@Slf4j
@Service
public class ClearData {

    @Autowired
    private InviteTenderService inviteTenderService;
    @Autowired
    private SubmitTenderService submitTenderService;

    @Autowired
    private InstanceVideoService instanceVideoService;

    @Scheduled(cron = "${clear.cache.data.cron}")
    public void clear() {
        log.info("==============CLEAR  CACHE  DATA===================");
        inviteTenderService.clear();
        submitTenderService.clear();
        instanceVideoService.clear();
    }

}
